Replication repository for "Forecasting Turnout" by Stephen Ansolabehere, Jacob R. Brown, Kabir Khanna, Connor Halloran Phillips, and Charles Stewart III

# Datasets

- counties_analysis.csv -- County-level vote data used in main analysis
- districts_analysis.csv -- Congressional District-level vote data used in main analysis
- CPS_reg_turnout.dta -- CPS estimates of voting and registration
- 2020_EAVS_for_Public_Release_nolabel[1].csv -- Advanced vote data for 2020. Source: US Election Assistannce Commission. Codebook: https://eavsportal.com/Downloads/2020/2020-EAVS-FINAL-508c.pdf
- us-state-ansi-fips.csv -- State Census fips codes
- 1976-2020-house.csv -- Congressional district vote share data from MIT Election lab.
- ACS_county_2010.csv -- 2010 American Community Survey county data 
- ACS_county_2014.csv -- 2014 American Community Survey county data 
- ACS_county_2018.csv -- 2018 American Community Survey county data
- ACS_district_2010.csv -- 2010 American Community Survey Congressional District data 
- ACS_district_2012.csv -- 2012 American Community Survey Congressional District data 
- ACS_district_2014.csv -- 2014 American Community Survey Congressional District data 
- ACS_district_2016.csv -- 2016 American Community Survey Congressional District data 
- ACS_district_2018.csv -- 2018 American Community Survey Congressional District data 
- state-1976-2020-president.csv -- State presidential vote share data from MIT Election lab.

Codebooks for each data set are stored in the codebooks subdirectory.


# Scripts

Replication scripts are contained in the code folder and are numbered 01-36. Scripts 01-32 execute each of the models and store the output in the results and output folders. Scripts 33-36 then call this output to generate figures and tables for the paper. 

run_all.R will run all scripts in the correct order and generate all figures and tables in the paper, except for Table 5, which must be generated in Stata using cps.do. run_all.R will also create the directories results, output, tables, and figures, if they are not already created.

The log/ subdirectory in the repository contains scripts to run versions of the model with logged total votes and logged registration/lagged vote. This folder includes a run_log.R script that runs all of the scripts in the correct sequence to output the logged results in the Appendix. The output from running these scripts is stored in the log/ subdirectory.

FiguresandTables.xlsx contains information on each figure and table in the manuscript.

